package mop.exception;

/**
 * Exception class to be thrown when business rule 1 is violated
 * 
 * @author	 MOP Team 7
 */

public class BusinessRule1Exception extends Throwable
{

	/**
	 * Initializes an BussinesRule1Exception
	 */
	public BusinessRule1Exception(){}
	
	
	/**
	 * Return a error message that can be used by the GUI
	 * 
	 * @return An error message describing the business rule
	 */
	public String toString()
	{
		StringBuffer sb = new StringBuffer();
		sb.append("BusinessRule 1 has been violated !! \n");
		sb.append("The deadline is too urly, deadline must be after earliest possible end time of the task \n");
		sb.append("The earliest possible end time is the earliest possible end time of the dependent tasks, or the start date (whichever falls later) summoned by the duration");
		return sb.toString();
	}
	
	/**
	 * weird java demand
	 */
	private static final long serialVersionUID = 1L;
	
}
